package com.qxbb.report.Enum;

public enum DepositType {

    CASH("C","现金"),

    CARD("D","卡"),

    WE_CHAT("W","微信"),

    ALIPAY("A","支付宝");

    DepositType(String type,String msg){
        this.type = type;
        this.msg = msg;
    }

    public String getType(){
        return type;
    }

    private String getMsg() {
        return msg;
    }

    public  static String getDepositType(String msg){
        for (DepositType value : DepositType.values()) {
            if (msg.equals(value.msg)){
                return value.type;
            }
        }
        throw new RuntimeException("未知类型！");
    }

    private final String type;

    private final String msg;
}
